doctype html
html
  head
    title= title
    link(rel='stylesheet type="text/css', href='/stylesheets/default.css')
    link(rel="stylesheet" type="text/css", href="/js/swiper-3.4.1.min.css")
    link(rel='stylesheet type="text/css', href='/stylesheets/style.css')
    link(rel="stylesheet" type="text/css", href="/font/iconfont.css")

    script(src="/js/swiper-3.4.1.min.js")
    script(src="/js/index.js")
    script(src="/js/jquery-1.8.3.min.js")
  body
      #topBar
        .g-head
          .g-wrap.g-wrap1
            img(src='/img/index/login_phone.png')
            span 用户手机端
          .g-warp.g-wrap2
            span.u-span.span2.log 登陆
            i
            span.u-span.span2.reg 注册
      #nav
        img(src="img/index/chengbao_logo.png" alt="")
        ul.m-nav
          li
            a#Index 首页
          li
            a#Order_creation 制作订单
          li
            a#Order_accepting  接受订单
          li
            a#Information 资讯中心
          li
            a#Helf 帮助中心
          li
            a#About 关于我们
      script(type='text/javascript').
        $(function () {
          $(".m-nav li").each(function () {
            var s = $(this).index();
            $(".m-nav li").eq(s).click(function () {
              $(".m-nav li").removeClass("current");
              $(".m-nav li").eq(4).addClass("current");
              console.log(s);
            })
          })
          $(".log ").click(function () {
            window.open("login.jade","_self");
            

          })
          $(".reg ").click(function () {
            window.open("register.jade","_self");
           

          })

          $("#About ").click(function () {
            window.open("About.jade","_self");
          })


          var $t, leftX, newWidth;
          $('.m-nav').append('<div class="block"></div>');
          var $block = $('.block');

          $block.width($(".current").width()).css('left', $('.current a').position().left).data('rightLeft', $block.position().left).data('rightWidth', $block.width());

          $(".m-nav li").find('a').hover(function () {
            $t = $(this);
            leftX = $t.position().left;
            newWidth = $t.parent().width();
            $block.stop().animate({
              left: leftX,
              width: newWidth
            }, 300);
          }, function () {
            $block.stop().animate({
              left: $block.data('rightLeft'),
              width: $block.data('rightWidth')
            }, 300);

          })
        })

    block content



